package oo01;
//学生类
public class Student {
    //类的属性 成员变量
    String name;
    int age;
    String address;
    //类的方法
    void study(){System.out.println(name+"在学习...");}
    void sayHi(){System.out.println(name+"今年"+age+"岁了");}

    public static void main(String[] args) {
        Student s = new Student();
        s.name="王柳云";
        s.age=18;
        s.address="德园小区";
        s.study();
        s.sayHi();

        Student s2 = new Student();
        s2.name="谢云轩";
        s2.age=19;
        s2.address="礼园小区";
        s2.study();
        s2.sayHi();
    }
}
class Student2{
    String name;
    String country;
    void sayHello(){
        System.out.println(name+"来自"+country);
    }
}
